
/*							*/
/*  Indexed Sequential Access Method			*/
/*  Relational Database Systems, Inc.			*/
/*							*/
/*		Proprietary Data			*/
/*    This document contains proprietary information	*/
/* and trade secrets which are the property of		*/
/* Relational Database Systems, Inc. (RDSI). This	*/
/* document is submitted to recipient in confidence.	*/
/* The information contained herein may not be used,	*/
/* copied or disclosed in whole or in part except as	*/
/* permitted by written agreement signed by an officer	*/
/* of RDSI.						*/
/*							*/

#include "btree.h"

/*
 * version 1.00  Jan-01-82  RVH	original shipped version
 * version 1.01  Jul-13-82  RVH	fixed btadditem for deleted items
 * version 1.02  Aug-17-82  RVH	         "
 * version 1.03  Sep-21-82  RVH	fixed bad permission on audit trail
 *			 	fixed transaction/version number
 *				handle system call errors
 *				disable all locking if opened ISEXCLLOCK
 * version 1.04  May-23-83  RVH install in UNIX Kernel
 *				some name changes to prevent conflicts
 * version 1.05  Aug-19-83  RVH lots of speed enhancements
 *				fast sequential reads available
 * version 2.00  Sep-01-83  RVH shipment version number
 * version 2.01  Oct-18-83  RVH check for deleting current key
 *                              update problem with treelev
 *                              piped ISAM additions
 */

char *isversnumber = "C-ISAM version 2.01";
char *iscopyright  = "Copyright (C) 1982, 1983 Relational Database Systems, Inc.";
char *isserial     = "Software Serial Number RDS-000001";

#ifdef lint
STATIC int _VOID_ = 0;
#endif

#ifndef ISKERNEL
extern int errno;
int  iserrno;
int  iserrio;
char isstat1;
char isstat2;

STATIC struct item treeitem;
STATIC short treelev;
STATIC short treeleaf;
STATIC short treeflags;
STATIC struct ifile *filep;
STATIC struct open *openp;
STATIC struct dict *dictp;
#endif  /* ISKERNEL */

STATIC short nfiles = NFILES;
STATIC struct ifile *files[NFILES];
#ifndef ISALLOC
STATIC struct ifile filetab[NFILES];
#endif  /* ISALLOC */

STATIC short nopens = NOPENS;
STATIC struct open *opens[NOPENS];
#ifndef ISALLOC
STATIC struct open opentab[NOPENS];
#endif  /* ISALLOC */

STATIC short nbuffs = NBUFS;
STATIC struct buff avbuffs;

#ifdef ISALLOC
STATIC struct buff *buffs;
STATIC char *buffers;
#else
STATIC struct buff buffs[NBUFS];
#ifndef ISKERNEL
STATIC char buffers[NBUFS*NODESIZE];
#endif  /* ISKERNEL */
#endif /* ISALLOC */

#ifdef CREATLOCK
STATIC struct lock locks;
#endif

#ifdef DRVRLOCK
STATIC short lkfd = -1;
STATIC struct liocb liocb;
STATIC struct lock  locks[NLOCKS];
#endif

#ifndef ISKERNEL
STATIC char temprecord[RECORDSIZE+4];
#endif

